﻿#继承和多态
class Animal(object):
	name = 999#其实这就是静态变量 也叫类属性
	def run(self):
		print("Animal is running");
		
class Dog(Animal):
	def run(self):
		print("dog is running");

	def eat(self):
		print("dog is eat");
class Cat(Animal):
	def run(self):
		print("cat is running");
		
class Monster(Animal):
	pass;

dog = Dog();
dog.run();
dog.eat();
dog = Monster();
dog.run();
print(Animal.name);
Animal.name = 888
print(Dog.name);
# Animal.name

#dir可以获取对象的所有属性和方法
# 类属性 其实就是静态变量